package com.weishi.project.api.ret;

import io.swagger.annotations.ApiParam;
import io.swagger.models.auth.In;
import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
public class TrainingAllDataInfoRet {

    @ApiParam(value = "当天基础信息")
    private BaseInfo baseInfo;

    @ApiParam(value = "当天训练场地信息")
    private TrainingGroundInfo trainingGroundInfo;

    @ApiParam(value = "成绩信息")
    private AchievementInfo achievementInfo;

    @ApiParam(value = "运动员HR信息")
    private List<Map<String,Object>> sportsManHRs;

    @ApiParam(value = "运动员LA信息")
    private List<Map<String,Object>> sportsManLAs;

    public BaseInfo getBaseInfo() {
        if(baseInfo==null){
            baseInfo = new BaseInfo();
        }
        return baseInfo;
    }

    public TrainingGroundInfo getTrainingGroundInfo() {
        if(trainingGroundInfo==null){
            trainingGroundInfo = new TrainingGroundInfo();
        }
        return trainingGroundInfo;
    }

    public AchievementInfo getAchievementInfo() {
        if(achievementInfo==null){
            achievementInfo = new AchievementInfo();
        }
        return achievementInfo;
    }

    @Data
    public class BaseInfo{

        @ApiParam(value = "训练时间")
        private String trainingDay;

        @ApiParam(value = "一级科目")
        private String firstLevel;

        @ApiParam(value = "二级科目")
        private String secondLevel;

        @ApiParam(value = "艇种")
        private String boatType;

        @ApiParam(value = "运动员")
        private String sportsmanName;

        @ApiParam(value = "运动员Id")
        private Integer sportsmanId;

        @ApiParam(value = "小组")
        private String groupName;
    }

    @Data
    public class TrainingGroundInfo{

        @ApiParam(value = "天气")
        private String weather;

        @ApiParam(value = "气温")
        private String airTemperature;

        @ApiParam(value = "风速")
        private String windSpeed;

        @ApiParam(value = "场地因素")
        private String siteFactors;

    }

    @Data
    public class AchievementInfo{

        @ApiParam(value = "ID")
        private String id;

        @ApiParam(value = "划行里程数/公里")
        private String rowingKilometers;
        private int rowingClassHour;

        @ApiParam(value = "总成绩/毫秒")
        private String achievement;

        @ApiParam(value = "桨频/次")
        private String propellerFrequency;

        @ApiParam(value = "瓦特/次")
        private String watt;

        @ApiParam(value = "功率/W")
        private String power;

        @ApiParam(value = "分段成绩")
        private String segmentedTimings;

    }
}
